/**
 * 用户api 
 * 
*/

import { postRequest, getRequest } from '@/lib/axios';

export const usersApi = {
    /*
    * 注册
    *
    */
    register: (params) => {
        return postRequest('/api/private/users/register', params);
    },

    /*
    * 创建用户
    *
    */
    create: (params) => {
        return postRequest('/api/private/users/create', params);
    },

    /**
     * 重置用户密码
     * 
    */
    resetPassword: (params) => {
        return postRequest('/api/private/users/resetPassword', params);
    },

    /**
     * 更新用户信息 
     * 
    */
    update: (params) => {
        return postRequest('/api/private/users/update', params);
    },

    /**
     * 查询所有用户信息 
     * 
    */
    list: (params) => {
        return postRequest('/api/private/users/list', params);
    },

    /**
     * 查询单个用户信息 
     * 
    */
    findOne: (params) => {
        return postRequest('/api/private/users/findOne', params);
    },

    /**
     * 删除单个用户信息 
     * 
    */
    delete: (params) => {
        return postRequest('/api/private/users/delete', params);
    },

    /**
     * 删除所有用户信息 
     * 
    */
    deleteAll: () => {
        return postRequest('/api/private/users/deleteAll');
    },
}